package com.choichumgming.rentcat.service.Impl;

import com.choichumgming.rentcat.mapper.PmsProductCategoryMapper;
import com.choichumgming.rentcat.model.PmsProductCategory;
import com.choichumgming.rentcat.model.PmsProductCategoryExample;
import com.choichumgming.rentcat.service.PmsCatagoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PmsCatagoryServiceImpl implements PmsCatagoryService {
    @Autowired
    PmsProductCategoryMapper pmsProductCategoryMapper;

    @Override
    public List<PmsProductCategory> getAll() {
        PmsProductCategoryExample example = new PmsProductCategoryExample();
        example.createCriteria().andCategoryIdIsNotNull();
        List<PmsProductCategory> catagoryList = pmsProductCategoryMapper.selectByExample(example);
        return catagoryList;
    }


}
